﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Combat/Combat.master" AutoEventWireup="true"
    CodeFile="SearchAptitude.aspx.cs" Inherits="Aptitude_SearchAptitude" StylesheetTheme="Content" %>

<%@ Register Src="../../UserContral/ListPageContral.ascx" TagName="ListPageContral"
    TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

    <script type="text/javascript">
        //<![CDATA][
        function CheckAll(oCheckbox) {
            var items = document.getElementsByTagName("INPUT");
            for (i = 0; i < items.length; i++) {
                if (items[i].type == "checkbox") {
                    items[i].checked = oCheckbox.checked;
                }
            }
        }
        //]]>
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table width="100%" cellpadding="0" cellspacing="0" runat="server" id="tb" class="intable">
        <caption>
            <span>资质考核成绩查询条件</span></caption>
        <tr>
            <td style="width: 13%">
                考核题目：
            </td>
            <td style="width: 37%">
                <asp:DropDownList ID="ddlExam" runat="server" Width="200">
                </asp:DropDownList>
            </td>
            <td style="width: 10%">
                单位：
            </td>
            <td style="width: 40%">
                <asp:DropDownList ID="ddlDepartment" runat="server" Width="200">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td>
                是否合格：
            </td>
            <td>
                <asp:DropDownList runat="server" ID="ddlStandard" Width="200">
                    <asp:ListItem Value="">全部</asp:ListItem>
                    <asp:ListItem Value="1">合格</asp:ListItem>
                    <asp:ListItem Value="-1">不合格</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td>
                姓名：
            </td>
            <td>
                <asp:TextBox ID="txtSoldierName" runat="server" Width="195px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                是否合同制：
            </td>
            <td>
                <asp:RadioButtonList ID="rbtContract" runat="server" RepeatDirection="Horizontal">
                    <asp:ListItem Value="0" Selected="True" Text="消防官兵"></asp:ListItem>
                    <asp:ListItem Value="1" Text="合同制消防员"></asp:ListItem>
                </asp:RadioButtonList>
            </td>
            <td>
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <td colspan="4" style="text-align: center">
                <asp:Button ID="btnSearch" runat="server" Text="查询" OnClick="btnSearch_Click" />
            </td>
        </tr>
    </table>
    <div style="clear: both">
    </div>
    <asp:GridView ID="gvStandard" runat="server" AutoGenerateColumns="False" Caption="<span>考核士兵列表</span>"
        AllowPaging="True" OnRowDataBound="gvStandard_RowDataBound" PageSize="15">
        <Columns>
            <asp:TemplateField>
                <ItemStyle Width="5%" />
                <ItemTemplate>
                    <asp:Label runat="server" ID="lblID"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="姓名">
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# GetSoldierName(Eval("SoldierID").ToString()) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="单位">
                <ItemTemplate>
                    <asp:Label ID="Label2" runat="server" Text='<%# GetFullDepartmentName(Eval("SoldierID").ToString()) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="级别">
                <ItemTemplate>
                    <asp:Label ID="Label3" runat="server" Text='<%# GetRangerName(int.Parse(Eval("RangerID").ToString())) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="PhysicalAvgScore" HeaderText="体能总分" />
            <asp:TemplateField HeaderText="技能达标情况">
                <ItemTemplate>
                    <asp:Label ID="Label4" runat="server" Text='<%# Convert.ToBoolean(Eval("SkillStandard").ToString())?"全部达标":"未全部达标" %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="笔试分数">
                <ItemTemplate>
                    <asp:Label ID="lblBiShi" runat="server"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="综合评定">
                <ItemTemplate>
                    <asp:Label ID="Label5" runat="server" Text='<%# GetStandard(int.Parse(Eval("Standard").ToString())) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="查看">
                <ItemTemplate>
                    <asp:HyperLink ImageUrl="~/Images/UserView.gif" ID="HyperLink1" runat="server" NavigateUrl='<%#"SoldierScore.aspx?RangerID="+Eval("RangerID").ToString()+"&ExamID="+Eval("ExamID").ToString()+"&SoldierID="+Eval("SoldierID").ToString()+"&standardID="+Eval("StandardID").ToString() %>'>查看</asp:HyperLink>
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" Width="25" />
                <HeaderStyle HorizontalAlign="Center" Width="25" />
            </asp:TemplateField>
        </Columns>
        <PagerTemplate>
        </PagerTemplate>
        <HeaderStyle HorizontalAlign="Left" />
        <RowStyle HorizontalAlign="Left" />
    </asp:GridView>
    <uc1:ListPageContral ID="ListPageContral1" runat="server" OnPageSizeChange="ListPageContral1_PageSizeChange"
        PageSize="15" />
</asp:Content>
